Skip to content

feat(projects): streamline project creation controls - #6677

Open
matt2e wants to merge 21 commits into
mainfrom
jitter/project-create-controls
Open

feat(projects): streamline project creation controls#6677
matt2e wants to merge 21 commits into
mainfrom
jitter/project-create-controls

Conversation

@matt2e

@matt2e matt2e commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • move Add project from the collapsible sidebars into the right side of the persistent Projects tab row
  • make the unlisted indicator quieter with an icon and tooltip
  • fix private + unlisted project creation failing during owner readback
  • verify newly created projects are pinned in the sidebar and shown in the overview

Root cause

Private + unlisted creation published successfully, but immediate read-model reconstruction omitted the viewer pubkey. The owner’s own unlisted project was therefore filtered from the result and the UI reported that the created project could not be read.

Screenshots

Add project in the persistent header

Add project in the Projects header

Narrow layout

Add project in the narrow Projects header

Private + unlisted creation succeeds and pins the project

Created private unlisted project pinned in the sidebar

Unlisted status is now a quiet icon

Private unlisted project in the overview

Testing

  • pnpm --dir desktop typecheck
  • pnpm --dir desktop check
  • pnpm --dir desktop test (5,473 passed)
  • affected Projects Playwright specs (70 passed)

A full Desktop Playwright attempt reached 1,080 passing tests. Four unrelated tests failed before the shared web server exited; later failures were a connection-refused cascade. The three affected Projects specs were then rebuilt and rerun together: 70/70 passed.

Non-goals

  • No three-state visibility collapse: private channel access and project discoverability are currently independent, so that UI would hide a real permissions distinction.
  • No top-navigation/sidebar consolidation; explicitly deferred in the discussion.
  • No repo-less task implementation; that requires a separate task-coordinate compatibility change.

thomaspblock and others added 21 commits August 22, 2026 20:57
Give agents bounded project-home context and project-aware CLI operations while keeping channel matching client-filtered through the existing relay query surface.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Co-authored-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
Signed-off-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
Co-authored-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
Signed-off-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
## Summary
- create explicit NIP-MP projects with a home channel and default
repository
- preserve standalone repository folding, project deletion, and
deterministic repository selection
- restore Template, Team, visibility, and agent settings in the project
creation flow

This is Part 2 of the channel-first Projects stack, following #6590. It
is independently based on `main`; Part 3 adds the project-home channel
surface.

## Testing
- focused project collection, creation, channel, and model tests: 38/38
passed
- Desktop unit suite: 5,415/5,415 passed
- TypeScript, Biome, and differential file-size checks passed
- full pre-push gate passed

## Post-Deploy Monitoring & Validation
- create listed and unlisted projects with and without templates in the
first staging Desktop session
- healthy signals: one home channel, one default repository, stable
project coordinates, and no duplicate legacy card
- failure signals: partial project creation, duplicate projects, missing
default repository, or stale sidebar entries; mitigate by reverting this
PR

---------

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
## Summary
- classify and render project-home channels through the shared channel
glyph and lifecycle helpers
- let the normal channel pane host a project idle auxiliary surface and
focus drawer
- align channel management, headers, member bars, and empty-channel
actions with project channel semantics

This is Part 3 of the channel-first Projects stack, based on #6591. Part
4 adds the project-home navigation and context experience.

## Testing
- focused channel lifecycle, pane helper, and project-home channel
tests: 7/7 passed
- Desktop unit suite: 5,422/5,422 passed
- E2E-mode Desktop build passed
- TypeScript, Biome, and differential file-size checks passed
- full pre-push gate passed

## Post-Deploy Monitoring & Validation
- open normal, temporary, private, and project-home channels in the
first staging Desktop session
- healthy signals: normal channels retain their existing composer/thread
behavior and project homes use the project glyph and auxiliary slot
- failure signals: missing composer, incorrect channel kind, stuck focus
drawer, or project chrome on a normal channel; mitigate by reverting
this PR

---------

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Signed-off-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
Co-authored-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
## Summary
- render an explicit project's home channel through the normal channel
timeline and composer
- add a resizable project context rail with codebase, channel, people,
and workspace navigation
- keep project agent conversations bounded to the project home and
preserve repository/detail routes

This is Part 4 of the channel-first Projects stack, based on #6594. The
final part contains overview and workspace completion polish.

## Testing
- focused project conversation, route, summary, workspace-sheet, and
related-channel tests: 39/39 passed
- Desktop unit suite: 5,439/5,439 passed
- E2E-mode Desktop build passed
- TypeScript, Biome, and differential file-size checks passed
- full pre-push gate passed

## Post-Deploy Monitoring & Validation
- open project homes from project and channel entry points in the first
staging Desktop session
- healthy signals: one channel timeline/composer, stable repository
context, bounded project agent history, and reversible workspace sheets
- failure signals: duplicate channel surfaces, stale repository
selection, unrelated DM history, or sheets replacing the channel route;
mitigate by reverting this PR

Signed-off-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
Co-authored-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
Open project homes consistently from channel and project routes, preserve file/work-item deep links, and let agents request owner-reviewed project channels.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Co-authored-by: Thomas Petersen <thomasp@squareup.com>
## Summary
- make the Projects overview follow the active section with consistent
context, empty states, and row alignment
- add an animated section-local search that preserves sort and
responsive tab behavior
- simplify sidebar and list controls while keeping large project
collections incrementally mounted

This is Part 6 of the channel-first Projects stack, based on #6597. The
final part contains project workspace aggregation and the default
project-home template.

## Testing
- focused search, activity digest, agent selection, related-channel, and
overview-context tests: 26/26 passed
- Desktop unit suite: 5,451/5,451 passed
- E2E-mode Desktop build passed
- TypeScript, Biome, and differential file-size checks passed
- full pre-push gate passed

## Post-Deploy Monitoring & Validation
- exercise every Projects overview section, search transition, selection
state, and right context rail in staging Desktop
- healthy signals: stable tabs, aligned rows, correct section context,
and responsive large-list interaction
- failure signals: search flicker, stale context, wrapped toolbar rows,
missing empty actions, or input lag; mitigate by reverting this PR

---------

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Signed-off-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
Co-authored-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
Complete project-home defaults, category-specific creation, responsive grouping, and project-wide task and commit views across every repository.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Co-authored-by: Thomas Petersen <thomasp@squareup.com>
Give project workspace sheets explicit auxiliary priority so Tasks, Reviews, Commits, Files, and People remain accessible without discarding an open conversation thread.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Co-authored-by: Thomas Petersen <thomasp@squareup.com>
Make workspace-sheet precedence independent of whether the active thread uses a focus drawer, split pane, or narrow auxiliary layout.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Co-authored-by: Thomas Petersen <thomasp@squareup.com>
Suppress the browser-default outline on the programmatically focused drawer while retaining focus indicators on its interactive controls.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Co-authored-by: Thomas Petersen <thomasp@squareup.com>
Route non-DM sidebar icons through the shared channel glyph so project-home channels render with their project folder mark.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Co-authored-by: Thomas Petersen <thomasp@squareup.com>
Collapse the context rail before a workspace drawer enters so the sheet keeps a fixed width, and hide the sidebar-style resize guide without removing resizing.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Co-authored-by: Thomas Petersen <thomasp@squareup.com>
Use the stateful drawer affordance in both wide and narrow Projects layouts so context controls match the rest of the project surfaces.

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Co-authored-by: Thomas Petersen <thomasp@squareup.com>
Co-authored-by: Thomas Petersen <thomasp@squareup.com>
Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Co-authored-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
Signed-off-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
Co-authored-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
Signed-off-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
Co-authored-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
Signed-off-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
@matt2e
matt2e marked this pull request as ready for review August 24, 2026 09:40
@matt2e
matt2e requested a review from a team as a code owner August 24, 2026 09:40
Base automatically changed from projects-channel-first-pt7-workspace-finish to projects-channel-first-pt5-navigation-requests August 24, 2026 10:54
Comment on lines +253 to +256
const addedProjectAddresses = useProjectSidebarMembership(
relayOrigin,
currentPubkey,
);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sidebar already mounts useProjectSidebarMembership for this scope, so mounting it again here creates a second relay subscription and sync manager. A membership change while the overview remains open can make both managers schedule encrypted replacement-event publications independently, producing redundant writes and potentially competing equal-timestamp heads. Consider sharing the synchronized membership state or adding a read-only consumer for this selected-address set.

Generated by AI

@jedwards27 jedwards27 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST CHANGES

Reviewed: c5f60a2d3b2df40b81d4134c65ebd96662924975..4754ef7eef057289a8f78bc05dc823714eb616e3 (exact head 4754ef7eef057289a8f78bc05dc823714eb616e3)

Risk: medium — user-visible project creation/navigation plus owner-bound private/unlisted readback and pin/list state.

Blocking finding

  • [P2] Restore the required Desktop file-size gate. desktop/src/features/projects/ui/ProjectsView.tsx is 1,023 lines, over the 1,000-line ratchet. Exact-head just file-size-check fails locally (990 -> 1023, +33), and GitHub run 32704521600, job 97362698027, reports the same failure (986 -> 1023, +37). Path detection then skips Desktop Core, smoke E2E, and downstream lanes. The live PR is also conflicting/dirty against its base, so the resulting conflict-resolved revision has not received required CI.

Author action: rebase and resolve the base conflict; extract or shrink ProjectsView.tsx below the ratchet; obtain fresh exact-head CI.

Verification owner: author for the conflict/code repair; CI and :bot: Jude’s code review agent for the fresh-head gates and delta review.

Behavior/contracts traced

The signed project-event pubkey is now used for owner reconstruction (createProject.ts:88-101), owner-only unlisted admission remains enforced (projectModels.ts:454-461), and creation pins under relay+owner scope while optimistically inserting/deduplicating before invalidation (useCreateProject.ts:39-56). This aligns with VISION_PROJECTS.md:55-73,138. Focused coverage passed for private+unlisted owner readback, publication retry, lost-ack idempotency, project browsing/creation, sidebar pinning, and the overview indicator. Removing only viewerPubkey: projectEvent.pubkey causally failed owner readback; restoring it passed again. A 640 px capture retained a visible, usable persistent add control.

Validation at clean exact head

  • PASS — pnpm --dir desktop typecheck
  • PASS — pnpm --dir desktop check (reported warnings were outside this change’s intent)
  • PASS — pnpm --dir desktop test: 5,473/5,473
  • PASS — focused private+unlisted creation E2E: 1/1, including causal mutation proof
  • PASS — focused retry, lost-ack idempotency, and header add-flow coverage
  • FAIL — just file-size-check, as above

A broad project smoke attempt (7 pass/63 fail) is not reliable regression evidence: failures cascaded after the web server exited with ERR_CONNECTION_REFUSED, and initial stale helpers waited for the prior add-control path; the implicated retry case passed in focused isolation.

Manual/native evidence: narrow 640 px browser capture only; no exact-head native/real-relay restart journey.

Residual risk: mock E2E and source tracing establish the changed frontend contract, but not real-relay propagation/restart persistence. Rerun required project smoke coverage on the fresh conflict-resolved head with a stable server lifecycle/selectors. This is reviewer/tooling verification, not additional author rework beyond the blocker above.

Base automatically changed from projects-channel-first-pt5-navigation-requests to projects-channel-first-pt1-agent-cli August 25, 2026 21:34
Base automatically changed from projects-channel-first-pt1-agent-cli to main August 26, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants